% Remember to use the lgrind style

\Head{}
\File{./java/Main.java}{2006}{4}{27}{19:09}{1624}
\L{\LB{\C{}/*}}
\L{\LB{_*_Main.java}}
\L{\LB{_*}}
\L{\LB{_*_Created_on_January_5,_2006,_10:49_AM}}
\L{\LB{_*/\CE{}}}
\L{\LB{}}
\L{\LB{\K{package}_\V{project01};}}
\L{\LB{}}
\L{\LB{\K{import}_\V{javax}.\V{swing}.*;}}
\L{\LB{\K{import}_\V{javax}.\V{swing}.\V{event}.*;}}
\L{\LB{\K{import}_\V{java}.\V{awt}.*;}}
\L{\LB{\K{import}_\V{java}.\V{awt}.\V{event}.*;}}
\L{\LB{\K{import}_\V{java}.\V{applet}.*;}}
\L{\LB{\K{import}_\V{com}.\V{bruceeckel}.\V{swing}.*;}}
\L{\LB{\K{import}_\V{java}.\V{lang}.*;}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}/**}}
\L{\LB{_*}}
\L{\LB{_*_\CE{}\V{author}_\V{Ian}_\V{Melnick}}}
\L{\LB{\C{}*/\CE{}}}
\L{\LB{\K{public}_\K{class}_\V{Main}_\K{extends}_\V{JApplet}_\{}}
\L{\LB{}\Tab{4}{\V{enum}_\V{AppModes}_\{_\V{Editor},_\V{Router}_\}}}
\L{\LB{}\Tab{4}{\K{public}_\V{Args}_\V{a};}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\C{}/**_Creates_a_new_instance_of_Main_*/\CE{}}}
\index{Main}\Proc{Main}\L{\LB{}\Tab{4}{\K{public}_\V{Main}()_\{}}
\L{\LB{}\Tab{8}{\V{a}_=_\V{Utility}.\V{getArgs}(\K{new}_\V{String}[\N{0}],_\K{this});}}
\L{\LB{}\Tab{4}{\}}}
\index{Main}\Proc{Main}\L{\LB{}\Tab{4}{\K{public}_\V{Main}(\V{String}[\,]_\V{args})_\{}}
\L{\LB{}\Tab{8}{\V{a}_=_\V{Utility}.\V{getArgs}(\V{args},_\K{this});}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\index{launch}\Proc{launch}\L{\LB{}\Tab{4}{\K{public}_\K{void}_\V{launch}()_\{}}
\L{\LB{}\Tab{8}{\K{switch}(\V{a}.\V{mode})_\{}}
\L{\LB{}\Tab{12}{\K{case}_\V{Router:}}}
\L{\LB{}\Tab{16}{\V{Console}.\V{run}(\K{new}_\V{Router}(\V{a}),_(\K{int})\V{a}.\V{resolution}.\V{getWidth}(),_(\K{int})\V{a}.\V{resolution}.\V{getHeight}());}}
\L{\LB{}\Tab{16}{\K{break};}}
\L{\LB{}\Tab{12}{\K{case}_\V{Editor:}}}
\L{\LB{}\Tab{16}{\V{Console}.\V{run}(\K{new}_\V{Editor}(\V{a}),_(\K{int})\V{a}.\V{resolution}.\V{getWidth}(),_(\K{int})\V{a}.\V{resolution}.\V{getHeight}());}}
\L{\LB{}\Tab{16}{\K{break};}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\C{}/**}}
\L{\LB{}\Tab{5}{*_\CE{}\V{param}_\V{args}_\V{the}_\V{command}_\V{line}_\V{arguments}}}
\L{\LB{\C{}*/\CE{}}}
\index{main}\Proc{main}\L{\LB{}\Tab{4}{\K{public}_\K{static}_\K{void}_\V{main}(\V{String}[\,]_\V{args})_\{}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{Main}_\V{prog}_=_\K{new}_\V{Main}(\V{args});}}
\L{\LB{}\Tab{8}{\V{prog}.\V{launch}();}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\C{}/*\}_catch_(java.lang.OutOfMemoryError_err)_\{}}
\L{\LB{}\Tab{12}{JOptionPane.showMessageDialog(null,_\3Ran_out_of_memory;_try_increasing_heap_size._If_using_browser,_increase_through_Java_control_panel---look_for_Runtime_Settings/Java_Runtime_Param,_add_-Xmx96m\3,_\3Error\3,_JOptionPane.ERROR\_MESSAGE);}}
\L{\LB{}\Tab{12}{System.out.println(\3Ran_out_of_memory,_start_with_increased_heap_size:_-Xmx96m\3);}}
\L{\LB{}\Tab{12}{System.exit(1);}}
\L{\LB{}\Tab{8}{\}*/\CE{}}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{\}}}
